Stop using g_assert() in the reftests.
{
GError *error = NULL;
char *filename;
+ int ret;
filename = get_output_file (test_name, extension, &error);
if (filename == NULL)
}
g_test_message ("Storing test result image at %s", filename);
- g_assert (cairo_surface_write_to_png (surface, filename) == CAIRO_STATUS_SUCCESS);
+ ret = cairo_surface_write_to_png (surface, filename);
+ g_assert_true (ret == CAIRO_STATUS_SUCCESS);
g_free (filename);
}
cairo_clip_extents (cr, &x1, &y1, &x2, &y2);
cairo_destroy (cr);
- g_assert (x1 == 0 && y1 == 0);
- g_assert (x2 > 0 && y2 > 0);
- g_assert ((int) x2 == x2 && (int) y2 == y2);
+ g_assert_true (x1 == 0 && y1 == 0);
+ g_assert_true (x2 > 0 && y2 > 0);
+ g_assert_true ((int) x2 == x2 && (int) y2 == y2);
*width = x2;
*height = y2;
cairo_destroy (cr);
- g_assert (cairo_surface_status (coerced) == CAIRO_STATUS_SUCCESS);
+ g_assert_true (cairo_surface_status (coerced) == CAIRO_STATUS_SUCCESS);
return coerced;
}
diff = cairo_image_surface_create (CAIRO_FORMAT_RGB24,
width,
height);
- g_assert (cairo_surface_status (diff) == CAIRO_STATUS_SUCCESS);
+ g_assert_true (cairo_surface_status (diff) == CAIRO_STATUS_SUCCESS);
buf_diff = cairo_image_surface_get_data (diff);
stride_diff = cairo_image_surface_get_stride (diff);
row = (guint32 *) (buf_diff + y * stride_diff);
G_MODULE_EXPORT void
reftest_uninhibit_snapshot (void)
{
- g_assert (inhibit_count > 0);
+ g_assert_true (inhibit_count > 0);
inhibit_count--;
}
GdkPaintable *paintable;
cairo_surface_t *surface;
- g_assert (gtk_widget_get_realized (widget));
+ g_assert_true (gtk_widget_get_realized (widget));
loop = g_main_loop_new (NULL, FALSE);
g_assert_no_error (error);
window = builder_get_toplevel (builder);
g_object_unref (builder);
- g_assert (window);
+ g_assert_true (window);
gtk_widget_show (window);